var form = jQuery('form#producao_<%=@producao.ano%>_<%=@producao.mes%>');
<% unless @producao.errors.empty? -%>
setErrorState(form);
<% else -%>
var newForm = jQuery('<%= escape_javascript(render(:partial => @producao)) %>');
setSuccessState(newForm);
form.replaceWith(newForm);
newForm.fixIntegerInputsOnBlur().find(':text[alt]').setDefaultMask();
registerBindings(newForm, true);
<% end -%>
